package ma.ac.onousc.gestionfi.budget.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;

/**
 * The persistent class for the role_personnel database table.
 * 
 */
@Entity
@Table(name = "role_personnel")
public class RolePersonnel implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private RolePersonnelPK id;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "DATE_CREATION")
	private Date dateCreation;

	// bi-directional many-to-one association to Personnel
	@ManyToOne
	@JoinColumn(name = "ID_PERSONNEL", insertable = false, updatable = false)
	private Personnel personnel;

	// bi-directional many-to-one association to Role
	@ManyToOne
	@JoinColumn(name = "ID_ROLE", insertable = false, updatable = false)
	private Role role;

	public RolePersonnel() {
	}

	public RolePersonnelPK getId() {
		return this.id;
	}

	public void setId(RolePersonnelPK id) {
		this.id = id;
	}

	public Date getDateCreation() {
		return this.dateCreation;
	}

	public void setDateCreation(Date dateCreation) {
		this.dateCreation = dateCreation;
	}

	public Personnel getPersonnel() {
		return this.personnel;
	}

	public void setPersonnel(Personnel personnel) {
		this.personnel = personnel;
	}

	public Role getRole() {
		return this.role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

}